package com.ruoyi.business.mapper;

import com.ruoyi.business.domain.RechargeOrder;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 话费充值订单Mapper接口
 *
 * @author xx
 * @date 2020-03-22
 */
public interface RechargeOrderMapper {
    /**
     * 查询话费充值订单
     *
     * @param id 话费充值订单ID
     * @return 话费充值订单
     */
    RechargeOrder selectRechargeOrderById(Long id);

    /**
     * 根据商家订单号查询
     *
     * @param orderNum
     * @return
     */
    RechargeOrder selectRechargeOrderByOrderNum(@Param("orderNum") String orderNum);

    /**
     * 查询话费充值订单列表
     *
     * @param rechargeOrder 话费充值订单
     * @return 话费充值订单集合
     */
    List<RechargeOrder> selectRechargeOrderList(RechargeOrder rechargeOrder);

    /**
     * 新增话费充值订单
     *
     * @param rechargeOrder 话费充值订单
     * @return 结果
     */
    int insertRechargeOrder(RechargeOrder rechargeOrder);

    /**
     * 修改话费充值订单
     *
     * @param rechargeOrder 话费充值订单
     * @return 结果
     */
    int updateRechargeOrder(RechargeOrder rechargeOrder);

    /**
     * 删除话费充值订单
     *
     * @param id 话费充值订单ID
     * @return 结果
     */
    int deleteRechargeOrderById(Long id);

    /**
     * 批量删除话费充值订单
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    int deleteRechargeOrderByIds(String[] ids);

    List<RechargeOrder> selectRechargeOrderByIds(Long[] ids);

    RechargeOrder selectByUserIdAndOrderNum(@Param("userId") Long userId, @Param("orderNum") String orderNum);
}
